#pragma once

#include <core/smart_ptr.h>

#include "vector3.h"

#include "Particle.h"




namespace math
{
   /**
    * @brief   An abstract class that defines a zone in space.
    */
   template
   <
      typename float_t
   >
   class Zone
   {
   public:

      typedef float_t            float_t;
      typedef vector3<float_t>   vector3_t;

   public:

      Zone() {}
      virtual ~Zone() {}



      /**
       * Generate a uniformly distributed position within this Zone.
       */
      virtual vector3_t generatePosition() const = 0;



      /**
       * Tests if the given particle is within the Zone.
       * A particle on the border is still considered as being
       * "within".
       */
      virtual bool isWithin(const Particle& particle) const = 0;

      /**
       * Tests if the given particle is outside the Zone.
       * A particle on the border is not considered as being "outside".
       */
      virtual bool isOutside(const Particle& particle) const = 0;
   };
   ///////////////////////////////////////////////////////////////////////////////////////////////

   typedef core::smart_ptr<Zone> ZonePtr;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
